Repository navigation
crypto: repair one-time keys when server has more than the account can store - #633
Merged
Merged
Conversation
Member
|
The repair method wasn't really meant for that, but I guess it should work. However, the client is already fairly careful about OTK uploads, so I'd prefer figuring out how it happened and preventing that over working around it |
tulir
approved these changes
Oct 20, 2026
tulir
left a comment
Member
There was a problem hiding this comment.
Oh, it was a server bug. This is fine as a temporary thing then. I'll probably remove RepairOneTimeKeys at some point, but it can stay there for a month or two at least
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If the server reports more signed one-time keys than
MaxNumberOfOneTimeKeys, some of them were already dropped from the account, and since they're claimed oldest-first, every new Olm session to the device fails until they're used up.ShareKeysnow runsRepairOneTimeKeysin the background once when the fetched count is above the max.Tag
@indentto continue the conversation here.